package com.mfl.calculator;

import java.math.BigDecimal;

/**
 * @Description: 芒果价格计算类
 * @Author: mfl
 * @Date:   2024-03-31
 */
public class MongoCalculator implements FruitCalculator {


    /**
     * 芒果价格计算
     * @param weight
     * @return
     */
    @Override
    public Double totalPrice(int weight) {
        return new BigDecimal("20")
                .multiply(new BigDecimal(String.valueOf(weight)))
                .doubleValue();
    }
}
